package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:52 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductTeamRelateBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductTeamRelate productTeamRelate;

  protected BeanMap getBeanMap() {

    return new BeanMap(productTeamRelate);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.Id);

    mappedDaoFields.put(
        "productId", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.ProductId);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.Remarks);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.Status);

    mappedDaoFields.put("teamId", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.TeamId);

    mappedDaoFields.put(
        "productCode", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.ProductCode);

    mappedDaoFields.put(
        "productName", com.ourteam.product.requirement.dao.IProductTeamRelateDAO.ProductName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductTeamRelateBean() {
    super();

    this.productTeamRelate = new com.ourteam.product.requirement.dao.ProductTeamRelate();
  }

  public ProductTeamRelateBean(
      com.ourteam.product.requirement.dao.ProductTeamRelate productTeamRelate) {
    super();

    this.productTeamRelate = productTeamRelate;
  }

  public com.ourteam.product.requirement.dao.ProductTeamRelate convertToProductTeamRelate() {
    return this.productTeamRelate;
  }

  public com.ourteam.product.requirement.dao.ProductTeamRelate convertTo() {
    return this.productTeamRelate;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productTeamRelate.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productTeamRelate.setId(id);
  }

  /**
   * Get productId
   *
   * @return long
   */
  public long getProductId() {
    return (long) this.productTeamRelate.getProductId();
  }

  /**
   * Set productId
   *
   * @parameter long
   */
  public void setProductId(long productId) {

    this.productTeamRelate.setProductId(productId);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productTeamRelate.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productTeamRelate.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productTeamRelate.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productTeamRelate.setStatus(status);
  }

  /**
   * Get teamId
   *
   * @return long
   */
  public long getTeamId() {
    return (long) this.productTeamRelate.getTeamId();
  }

  /**
   * Set teamId
   *
   * @parameter long
   */
  public void setTeamId(long teamId) {

    this.productTeamRelate.setTeamId(teamId);
  }

  /**
   * Get productCode
   *
   * @return String
   */
  public String getProductCode() {

    return (String) this.productTeamRelate.getProductCode();
  }

  /**
   * Get productName
   *
   * @return String
   */
  public String getProductName() {

    return (String) this.productTeamRelate.getProductName();
  }

  private String teamName;

  /**
   * Get teamName
   *
   * @return String
   */
  public String getTeamName() {

    return this.teamName;
  }

  /**
   * Set teamName
   *
   * @parameter String
   */
  public void setTeamName(String teamName) {

    this.teamName = teamName;
  }

  private String teamCode;

  /**
   * Get teamCode
   *
   * @return String
   */
  public String getTeamCode() {

    return this.teamCode;
  }

  /**
   * Set teamCode
   *
   * @parameter String
   */
  public void setTeamCode(String teamCode) {

    this.teamCode = teamCode;
  }

  private String teamMail;

  /**
   * Get teamMail
   *
   * @return String
   */
  public String getTeamMail() {

    return this.teamMail;
  }

  /**
   * Set teamMail
   *
   * @parameter String
   */
  public void setTeamMail(String teamMail) {

    this.teamMail = teamMail;
  }

  private String teamStatus;

  /**
   * Get teamStatus
   *
   * @return String
   */
  public String getTeamStatus() {

    return this.teamStatus;
  }

  /**
   * Set teamStatus
   *
   * @parameter String
   */
  public void setTeamStatus(String teamStatus) {

    this.teamStatus = teamStatus;
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductTeamRelateBean) == false) {
      return false;
    } // end if

    ProductTeamRelateBean other = (ProductTeamRelateBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductTeamRelate tempProductTeamRelate =
        other.convertToProductTeamRelate();

    if (tempProductTeamRelate == null || this.productTeamRelate == null) {
      isEqual = false;
    } else if (tempProductTeamRelate == this.productTeamRelate
        || tempProductTeamRelate.equals(this.productTeamRelate)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductTeamRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductTeamRelate[] aProductTeamRelates) {

    return toArray(aProductTeamRelates, null);
  }

  public static ProductTeamRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductTeamRelate[] aProductTeamRelates,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductTeamRelates)) {
      return new ProductTeamRelateBean[0];
    }

    int length = aProductTeamRelates.length;

    ProductTeamRelateBean[] beans = new ProductTeamRelateBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductTeamRelateBean(aProductTeamRelates[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductTeamRelates[i]});
      }
    }

    return beans;
  }
}
